function viewer(dom){
    console.log();
    dom.childNodes.forEach(item=>{
        item.addEventListener('click',function(e){
            //获取当前滚动高度
            let height = document.documentElement.scrollTop
            console.log(height);
            //禁止页面滚动
            document.querySelector('body').setAttribute('style','overflow: hidden;')
            let src = e.target.getAttribute('src')
            let mask = document.createElement('div');
            let close = document.createElement('div');
            close.classList.add('close')
            close.innerHTML = ` <i class="fa fa-close"></i>`
            close.onclick = function(){
                document.querySelector('body').removeAttribute('style')
                let removeEle = document.querySelector('.mask')
                document.querySelector('html').removeChild(removeEle)
            }
            mask.setAttribute('style','top:'+height+'px;')
            mask.classList.add('mask')
            let bigImg = document.createElement('img');
            bigImg.setAttribute('src',src)
         
            mask.appendChild(bigImg)
            mask.appendChild(close)
            document.querySelector('html').appendChild(mask)
        })
    })
}